package com.feiyu.gen;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

import com.feiyu.util.jdbcUtils;

public interface BaseParam
{
    
    /**
     * 
     * 获取基本的参数
     *
     * @return
     */
    static Map<String, Object> getBaseMap(){
        Map<String, Object> paramMap = new HashMap<>();
        paramMap.put("author", "nanshouxiao");
        return paramMap;
    }
    
    /**
     * 
     * 获取数据库字段类型对应java类型的map
     *
     * @return
     */
    static Map<String, String> getJdbcToJavaTypeMap(){
        Map<String, String> paramMap = new HashMap<>();
        paramMap.put("char", "String");
        paramMap.put("varchar", "String");
        paramMap.put("text", "String");
        paramMap.put("bit", "Boolean");
        paramMap. put("tinyint", "Integer");
        paramMap.put("int", "Integer");
        paramMap. put("bigint", "Long");
        paramMap. put("double", "Double");
        paramMap. put("decimal", "java.math.BigDecimal");
        paramMap. put("datetime", "java.time.LocalDateTime");
        paramMap. put("date", "java.time.LocalDate");
        paramMap. put("time", "java.time.LocalTime");
        return paramMap;
    }
    
    Map<String, String> jdbcToJavaTypeMap = getJdbcToJavaTypeMap();
}
